using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialStatisticsTools._MeasuringGeographicDistributions
{
    /// <summary>
    /// <para>Median Center</para>
    /// <para>Identifies the location that minimizes overall Euclidean distance to the features in a dataset.</para>
    /// <para>标识最小化到数据集中要素的总欧几里得距离的位置。</para>
    /// </summary>    
    [DisplayName("Median Center")]
    public class MedianCenter : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MedianCenter()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_Input_Feature_Class">
        /// <para>Input Feature Class</para>
        /// <para>A feature class for which the median center will be calculated.</para>
        /// <para>将计算中值中心的要素类。</para>
        /// </param>
        /// <param name="_Output_Feature_Class">
        /// <para>Output Feature Class</para>
        /// <para>A point feature class that will contain the features representing the median centers of the input feature class.</para>
        /// <para>一个点要素类，该要素类将包含表示输入要素类的中值中心的要素。</para>
        /// </param>
        public MedianCenter(object _Input_Feature_Class, object _Output_Feature_Class)
        {
            this._Input_Feature_Class = _Input_Feature_Class;
            this._Output_Feature_Class = _Output_Feature_Class;
        }
        public override string ToolboxName => "Spatial Statistics Tools";

        public override string ToolName => "Median Center";

        public override string CallName => "stats.MedianCenter";

        public override List<string> AcceptEnvironments => ["MResolution", "MTolerance", "XYResolution", "XYTolerance", "ZResolution", "ZTolerance", "geographicTransformations", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "qualifiedFieldNames", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_Input_Feature_Class, _Output_Feature_Class, _Weight_Field, _Case_Field, _Attribute_Field];

        /// <summary>
        /// <para>Input Feature Class</para>
        /// <para>A feature class for which the median center will be calculated.</para>
        /// <para>将计算中值中心的要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Input_Feature_Class { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>A point feature class that will contain the features representing the median centers of the input feature class.</para>
        /// <para>一个点要素类，该要素类将包含表示输入要素类的中值中心的要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Output_Feature_Class { get; set; }


        /// <summary>
        /// <para>Weight Field</para>
        /// <para>The numeric field used to create a weighted median center.</para>
        /// <para>用于创建加权中位数中心的数值字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Weight Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Weight_Field { get; set; } = null;


        /// <summary>
        /// <para>Case Field</para>
        /// <para>Field used to group features for separate median center calculations. The case field can be of integer, date, or string type.</para>
        /// <para>用于对要素进行分组以进行单独中位中心计算的字段。case 字段可以是整数、日期或字符串类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Case Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Case_Field { get; set; } = null;


        /// <summary>
        /// <para>Attribute Field</para>
        /// <para>Numeric field(s) for which the data median value will be computed.</para>
        /// <para>将计算其数据中值的数值字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Attribute Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _Attribute_Field { get; set; } = null;


        public MedianCenter SetEnv(object MResolution = null, object MTolerance = null, object XYResolution = null, object XYTolerance = null, object ZResolution = null, object ZTolerance = null, object geographicTransformations = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, bool? qualifiedFieldNames = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MResolution: MResolution, MTolerance: MTolerance, XYResolution: XYResolution, XYTolerance: XYTolerance, ZResolution: ZResolution, ZTolerance: ZTolerance, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, qualifiedFieldNames: qualifiedFieldNames, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}